package com.haredot.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.apache.solr.client.solrj.beans.Field;
import org.springframework.data.annotation.Id;

public class ResourceSolrDTO{

    @JsonSerialize(using = ToStringSerializer.class)
    @Id
    private Long id;

    /**
     * 资源名
     */
    private String resourceName;

    /**
     * 资源积分
     */
    @Field("vscore")
    private Integer score;

    /**
     * 资源大小
     */
    private Long size;

    /**
     * 资源扩展名
     */
    private String ext;
    /**
     * 关键字
     */
    @Field
    private String keywords ;
    /**
     * 日期格式
     */
    @Field("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String createTime ;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
}
